package com.fled.itsmbigscreen.enums;

/**
 * 订单状态枚举
 * 订单状态 0未接单 1已接单 2 已完成 3 已取消
 */
public enum MessageTemplateEnums {
    new_require(0,"新订单","收到新的订单,单号{0},采购物品{1}"),
    new_order(1,"新订单","收到新订单,单号{0},采购物品{1}"),
    po_change(2,"采购单状态更新","您的订单状态更新了,单号{0},当前状态{0}"),
    new_inquiry(3,"新询价单","收到新询价单,单号{0},询价物品{1}"),
    inquiry_change(4,"报价更新","采购单{0}有新的报价"),
    in_store(5,"入库通知","采购单{0}已经入库"),
    out_store(6,"派送通知","您的订单{0}正在派送中"),
    sign(7,"签收通知","订单{0}已签收"),
    settlement(8,"结算通知","收到新结算单单,单号{0}"),
    ;

    private Integer ecode;

    private String emsg;

    private String content;

    MessageTemplateEnums(Integer ecode, String emsg,String content) {
        this.ecode = ecode;
        this.emsg = emsg;
        this.content = content;
    }

    public Integer getEcode() {
        return ecode;
    }

    public String getEmsg() {
        return emsg;
    }
    public String getContent() {
        return content;
    }

    public static MessageTemplateEnums statOf(Integer ecode) {
        for (MessageTemplateEnums state : values())
            if (state.getEcode().equals(ecode))
                return state;
        return null;
    }
}
